package com.example.framework;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;

import androidx.appcompat.app.AppCompatActivity;

public class LauncherActivity extends AppCompatActivity
{
      
      @Override
      protected void onCreate(Bundle savedInstanceState)
      {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_launcher);
            new Handler().postDelayed(() -> startMainActivity(), 2000);
      }
      
      /**
       * 启动主页面
       */
      private void startMainActivity()
      {
            Intent intent = new Intent(this, MainActivity.class);
            startActivity(intent);
            //关闭当前页面
            finish();
      }
}
